package com.jindy.module.outgoingapproval.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jindy.activiti.domain.ProcessEntity;
import com.jindy.common.annotation.Excel;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;

import java.util.Date;

/**
 * 外出审批对象 sy_outgoing_approval
 * 
 * @author jindy
 * @date 2023-05-12
 */
@Data
public class SyOutgoingApproval extends ProcessEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 外出事由 */
    @Excel(name = "外出事由")
    private String reason;

    /** 开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date outgoingStartTime;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date outgoingEndTime;

    /** 外出时长，单位小时 */
    @Excel(name = "外出时长，单位小时")
    private Long outgoingTotalTime;

    /** 申请人 */
    @Excel(name = "申请人")
    private String applyUserId;

    /** 申请人 */
    @Excel(name = "申请人")
    private String applyUserName;

    /** 审批状态 */
    @Excel(name = "审批状态")
    private String businessStatus;

    /** 申请时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date applyTime;

    /** 流程实例ID */
    @Excel(name = "流程实例ID")
    private String instanceId;

    /** 流程定义key */
    @Excel(name = "流程定义key")
    private String processKey;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    /** 流水单号 */
    private String serialNum;


    @Override
    public String toString() {
        return new ToStringBuilder(this)
                .append("id", id)
                .append("reason", reason)
                .append("outgoingStartTime", outgoingStartTime)
                .append("outgoingEndTime", outgoingEndTime)
                .append("outgoingTotalTime", outgoingTotalTime)
                .append("applyUserId", applyUserId)
                .append("applyUserName", applyUserName)
                .append("applyTime", applyTime)
                .append("instanceId", instanceId)
                .append("processKey", processKey)
                .append("delFlag", delFlag)
                .append("serialNum", serialNum)
                .toString();
    }
}
